//
//  LJP_PlayerView.m
//  God_is_a_Girl
//
//  Created by 李继鹏 on 15/10/6.
//  Copyright (c) 2015年 呸. All rights reserved.
//

#import "LJP_PlayerView.h"

@implementation LJP_PlayerView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.player = [UIButton buttonWithType:UIButtonTypeCustom];
        self.pic = [[UIImageView alloc] initWithFrame:frame];
        self.player.frame = frame;
        self.pic.center = self.center;
        self.player.center = self.center;
        self.player.layer.cornerRadius = frame.size.height / 2;
        self.player.layer.masksToBounds = YES;
        self.player.layer.borderColor = [UIColor whiteColor].CGColor;
        self.player.layer.borderWidth = 5;
        self.pic.layer.cornerRadius = frame.size.height / 2;
        self.pic.layer.masksToBounds = YES;
        self.pic.layer.borderColor = [UIColor whiteColor].CGColor;
        self.pic.layer.borderWidth = 5;
        [self.player setBackgroundImage:[UIImage imageNamed:@"PlayButton"] forState:UIControlStateNormal];
        [self addSubview:self.player];
        [self addSubview:self.pic];
        self.backgroundColor = [UIColor colorWithRed:0.529 green:0.892 blue:0.776 alpha:1.000];
    }
    return self;
}

@end
